﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginControl.ascx.cs"
    Inherits="LoginControl" %>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />

<script language="Javascript">
 <!--

 function ClearField(obj) 
{
     if (obj.value == obj.defaultValue)
     {
         obj.value = "";
     }
}

 //-->
</script>

<table width="1000">
    <tr>
        <td width="590px">
            <asp:Label ID="lblDate" runat="server"></asp:Label>
        </td>
        <td valign="middle"">
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View1" runat="server">
                    &nbsp;
                    <asp:TextBox ID="tbUsername" runat="server" Value="Username" Width="100px"></asp:TextBox>&nbsp;
                    <asp:TextBox ID="tbPass" runat="server" Width="100px" Value="Password" TextMode="Password"></asp:TextBox>&nbsp;&nbsp;
                    <asp:Button ID="btnLogin" runat="server" Text="Đăng nhập" Height="25px" Width="80px"
                        OnClick="btnLogin_Click" />&nbsp;&nbsp;
                    <asp:HyperLink ID="HyperLink1" CssClass="hyperlink2" NavigateUrl="~/Register.aspx" runat="server">Đăng kí</asp:HyperLink>
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <div style="text-align: center;">
                        <asp:Label ID="lblError" runat="server" Text="Đăng nhập thất bại" ForeColor="Red"></asp:Label>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnBack" CssClass="hyperlink2" runat="server" OnClick="btnBack_Click"> >>Back</asp:LinkButton>
                    </div>
                </asp:View>
                <asp:View ID="View3" runat="server">
                    <div style="float: left; margin-left: 60px">
                        Xin chào,
                        <asp:Label ID="lblUsername" runat="server" ForeColor="Blue"></asp:Label>
                    </div>
                    <div style="float: right; margin-right: 10px;">
                        <asp:HyperLink ID="hplSetting" runat="server" NavigateUrl="Account.aspx" CssClass="hyperlink2">YourAccount</asp:HyperLink>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnLogout" CssClass="hyperlink2" runat="server" OnClick="btnLogout_Click">Thoát</asp:LinkButton>
                    </div>
                </asp:View>
            </asp:MultiView>
        </td>
    </tr>
</table>
